 <template>
 <view class="wifipage" style="margin-top:200px;text-align: center;">
<!-- #ifdef MP-ALIPAY -->
<wifi v-if="showwifi" :tag="store_id" :appId="conf.pageConf.appId" :img="conf.pageConf.img" :photo="conf.pageConf.photo" />
<!-- #endif -->

	 {{ msg }}
 </view>
</template>


<script>
import wifi from '@/api/alipay/index';
export default {
  data() {
    return {
      conf: {},
	  store_id: 0,
      showwifi: false,
      msg: '',
    };
  },
  onLoad(t) {
	let params = {};
      this.$allrequest.alipay.wifiIndex(params).then(res => {
        if (res.code == 0 && res.data) {
          this.showwifi = true;
          this.conf = res.data;
          this.store_id = res.store_id;
		  let wifiimage = document.getElementsByClassName('wifi-image')
		  if (wifiimage.length > 0){
			   wifiimage[0].style.width = 'auto';
		  }
        } else {
            this.msg = res.msg
        }
      });
	  
  }
}
</script>